//用户接口
import url from "@/url.config"
export default ({ service, request, tools }) => ({
    login(data) {
        console.log(url);
        //人员签到列表
        return request({
            url: url.ip2 + "/user/login",
            method: "post",
            data: data,
        })
    },
    // 获取token
    getToken(data){
        return request({
            url:url.ip3+"/auth/login",
            method:"post",
            data:data
        })
    },
    findRoleAndMenuByUserId(uid){
        return request({
            url: url.ip2 + "/role/findRoleAndMenuByUserId/"+uid,
            method: "get"
        })
    },
    findMenuByUserId(uid){
        return request({
            url: url.ip2 + "/role/findMenuByUserId/"+uid,
            method: "get"
        })
    },
    findCompanyByAreaId(uid){
        return request({
            url: url.ip2 + "/company/findCompanyByAreaId/"+uid,
            method: "get"
        })
    },
    getEquipmentInfoByCompanyId(id){
        return request({
            url: url.ip3 + "/equipment/getEquipmentInfoByCompanyId/"+id,
            method: "get"
        })
    }

})